package com.shenzhen.horselive.adapter;

import android.telephony.PhoneNumberUtils;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.shenzhen.horselive.R;
import com.shenzhen.horselive.beans.DirectPushBean;
import com.shenzhen.horselive.utils.PhoneUtils;

import org.jetbrains.annotations.NotNull;

public class DirectPushAdapter extends BaseQuickAdapter<DirectPushBean.DataBean, BaseViewHolder> {
    public DirectPushAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, DirectPushBean.DataBean dataBean) {
        baseViewHolder.setText(R.id.tv_name,dataBean.getRealName())
                .setText(R.id.tv_team_num,"团队："+dataBean.getTeamCount()+"人")
                .setText(R.id.tv_phone, PhoneUtils.settingphone(dataBean.getPhone()))
                .setText(R.id.tv_time,"注册日期："+dataBean.getCreateTime());
    }
}
